package org.jeecg.modules.car.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.entity.car.CarOrder;
import org.jeecg.entity.charge.ChargeInvoiceRequest;
import org.jeecg.model.car.reqvo.CarDayReportReqVo;
import org.jeecg.model.car.respvo.CarDayReportRespVo;
import org.jeecg.model.charge.reqvo.DayReportReqVo;
import org.jeecg.model.charge.resvo.DayReportRespVo;
import org.jeecg.modules.car.entity.CarPayConfig;

import java.util.List;

/**
 * @Description: 车禁订单
 * @Author: jeecg-boot
 * @Date:   2020-09-16
 * @Version: V1.0
 */
public interface CarOrderMapper extends BaseMapper<CarOrder> {

    List<CarOrder> findPage(Page<CarOrder> page, @Param("carOrder") CarOrder carOrder);

    void updateSyncStatus(@Param("id") String id, @Param("syncStatus") Integer syncStatus,@Param("remarks") String remarks);

    CarOrder getOrderBySn(@Param("sn") String sn);

    Integer updateOrderCarPay(@Param("sn") String sn, @Param("response") String response, @Param("payStatus") Integer payStatus, @Param("payTime") String payTime, @Param("syncStatus") Integer syncStatus,@Param("payType") Integer payType);

    CarOrder getOrderByTransNo(@Param("transNo") String transNo);

    CarOrder getEndChargeTime(@Param("carId") String carId, @Param("carOrderType") Integer carOrderType);

    List<CarDayReportRespVo> findGroupList(@Param("reportReq") CarDayReportReqVo carDayReportReqVo);

    CarOrder getByCarNo(@Param("carNo") String carNo);

    CarPayConfig getCarPayConfig(@Param("parkId") String parkId, @Param("payMethod") String payMethod);

    public List<DayReportRespVo> apiFindGroupList(@Param("dayReportReqVo") DayReportReqVo dayReportReqVo);

    List<ChargeInvoiceRequest> invoiceRequestListBySn(@Param("sn") String sn);

    ChargeInvoiceRequest invoiceRequestByFpqqlsh(@Param("fpqqlsh") String fpqqlsh);

    @SqlParser(filter = true)
    void addOrUpdate( @Param("bean") CarOrder carOrder);
}
